class JsOss {
  String accessKeyId;
  String policy;
  String signature;
  String expire;
  String dir;
  String host;
  String callback;

  JsOss(
    this.accessKeyId,
    this.policy,
    this.signature,
    this.expire,
    this.dir,
    this.host,
    this.callback,
  );

  static JsOss fromMap(Map<String, dynamic> map) {
    return JsOss(
      map["accessKeyId"] ?? "",
      map["policy"] ?? "",
      map["signature"] ?? "",
      map["expire"] ?? "",
      map["dir"] ?? "",
      map["host"] ?? "",
      map["callback"] ?? "",
    );
  }

  Map<String, Object?> toMap() {
    return {
      "accessKeyId": accessKeyId,
      "policy": policy,
      "signature": signature,
      "expire": expire,
      "dir": dir,
      "host": host,
      "callback": callback,
    };
  }

  @override
  String toString() {
    return toMap().toString();
  }
}
